import http from '@/common/http.js'
import qs from 'qs';

export async function getLocklist() { //获取开锁类型列表
	return await http({
		url: '/openlock/list',
		method: 'GET'
	})
}
export async function getLocksku(data) { //获取开锁类型
	return await http({
		url: '/openlock/details/'+data.id,
		method: 'GET'
	})
}
export async function getHomelist() { //获取家政类型列表
	return await http({
		url: '/homePro/types',
		method: 'GET'
	})
}

export async function getCompanylist(data) { //获取家政公司列表
	return await http({
		url: '/homePro/search',
		method: 'GET',
		data
	})
}

export async function companyDetail(data) { //获取家政公司详情
	return await http({
		url: `/homePro/provider/${data.id}`,
		method: 'GET',
		data
	})
}

export async function getHomes(data) { //获取类型下产品列表
	return await http({
		url: '/homePro/products/'+data.id,
		method: 'GET',
		data:data
	})
}
export async function getHomedetail(data) { //根据产品ID获取详情
	return await http({
		url: '/homePro/product/'+data.id,
		method: 'GET'
	})
}
export async function getHotHomes() { //热门家政服务
	return await http({
		url: '/homePro/hot',
		method: 'GET'
	})
}
export async function receiveCoupon(data) { //用户领券
	return await http({
		url: '/coupon/collect/'+data.id,
		method: 'GET'
	})
}

export async function receiveCoupons(data) { //一键领券
	return await http({
		url: '/coupon/collects',
		method: 'GET',
		data:data
	})
}

export async function getCommendetail(data) { //根据评论ID获取评论详情
	return await http({
		url: '/comm/get/'+data.id,
		method: 'GET'
	})
}
export async function getCommenList(data) { //分页查询商品评论列表
	return await http({
		url: '/comm/prolist',
		method: 'GET',
		data:data
	})
}
